package fhp.hlhj.giantfold.activity.user

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.webkit.WebViewClient
import com.zipingfang.android.yst.ui.base.BaseActivity
import com.zipingfang.android.yst.ui.utils.GoodsUtils
import fhp.hlhj.giantfold.R
import fhp.hlhj.giantfold.event.JsEvent
import fhp.hlhj.giantfold.javaBean.JsHelper
import kotlinx.android.synthetic.main.activity_help_aty.*
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode

class HelpAty : fhp.hlhj.giantfold.BaseActivity() {
    override fun getContentId(): Int {
        return R.layout.activity_help_aty
    }
    override fun initView() {
        webView.settings.javaScriptEnabled=true
        webView.settings.javaScriptCanOpenWindowsAutomatically = true;
        webView.addJavascriptInterface(JsHelper(this@HelpAty),"test")
        webView.webViewClient=object :WebViewClient(){

        }
        webView.loadUrl("file:///android_asset/HelpCenter.html")
    }
    @Subscribe(threadMode = ThreadMode.POSTING)
    fun handJs(jsEvent: JsEvent){

    }
}
